package main

import (
	"net"
	"time"
	"go-scripts/common"
	"fmt"
)

var logger = common.GetLogger()

func main()  {
	defer func() {
		if p := recover(); p != nil {
			logger.Fatal(p)
		}
	}()
	conn, err := net.DialTimeout("tcp", "127.0.0.1:8085", 2 * time.Second)
	if err != nil {
		panic(err)
	}
	b := []byte{}
	n, err :=conn.Read(b)
	if err != nil {
		panic(err)
	}
	content := string(b[:n])
	fmt.Println(content)
}
